<?php

namespace app\openapi\controller;

use think\facade\Session;

class AuthBase extends Base
{
    protected $userId;

    // 鉴权中间件
    protected $middleware = [
        \app\openapi\middleware\AuthMiddleware::class
    ];

    /**
     * 初始化
     */
    protected function initialize()
    {
        $this->userId = Session::get('userid');
    }
}
